#include "DIALOG.h"

extern GUI_CONST_STORAGE GUI_BITMAP bmfluoBtn1024x600;
// 122, // xSize
//  183, // ySize
void _cbFluoButton1024x600(WM_MESSAGE * pMsg) 
{ 
  WM_HWIN  hWin; 
  GUI_RECT Rect; 

  hWin  = pMsg->hWin; 
  switch (pMsg->MsgId)  
  { 
    case WM_PAINT: 
		WM_GetClientRect(&Rect); 

      if (BUTTON_IsPressed(hWin))  
      { 
		GUI_SetColor(GUI_BLUE); 
        GUI_FillRoundedRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 30); 
        GUI_SetBkColor(GUI_BLUE); 
        GUI_SetColor(GUI_WHITE);  

        GUI_SetAlpha(0xb0); 
        GUI_DrawBitmap(&bmfluoBtn1024x600, ((Rect.x1-Rect.x0)-122)/2, ((Rect.y1-Rect.y0)-183)/2); 
        GUI_SetAlpha(0);     
      }  
      else  
      { 
		 GUI_SetColor(GUI_MAKE_COLOR(0x002E2C2D)); 
        GUI_FillRoundedRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 30); 
		GUI_SetColor(GUI_MAKE_COLOR(0x002E2C2D)); 
        GUI_SetColor(GUI_WHITE);    

		GUI_DrawBitmap(&bmfluoBtn1024x600, ((Rect.x1-Rect.x0)-122)/2, ((Rect.y1-Rect.y0)-183)/2); 
      } 
      break; 
       
    default: 
      BUTTON_Callback(pMsg); 
  } 
} 

extern GUI_CONST_STORAGE GUI_BITMAP bmwhiteBtn;
extern GUI_CONST_STORAGE GUI_BITMAP bmwhiteLightbackup;

void _cbWhiteButton1024x600(WM_MESSAGE * pMsg)  
{ 
  WM_HWIN  hWin; 
	GUI_RECT Rect; 

  hWin  = pMsg->hWin; 
  switch (pMsg->MsgId)  
  { 
    case WM_PAINT: 
		WM_GetClientRect(&Rect); 

      if (BUTTON_IsPressed(hWin))  
      { 
		GUI_SetColor(GUI_BLUE); 
        GUI_FillRoundedRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 30); 
        GUI_SetBkColor(GUI_BLUE); 
        GUI_SetColor(GUI_WHITE);  

        GUI_SetAlpha(0xb0); 
//		GUI_DrawBitmap(&bmwhiteBtn, ((Rect.x1-Rect.x0)-173)/2, ((Rect.y1-Rect.y0)-207)/2); 
		GUI_DrawBitmap(&bmwhiteLightbackup, ((Rect.x1-Rect.x0)-321)/2, ((Rect.y1-Rect.y0)-232)/2); 
        GUI_SetAlpha(0);     
      }  
      else  
      { 
		 GUI_SetColor(GUI_MAKE_COLOR(0x002E2C2D)); 
        GUI_FillRoundedRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 30); 
        GUI_SetBkColor(GUI_MAKE_COLOR(0x002E2C2D)); 
        GUI_SetColor(GUI_WHITE);    

//		GUI_DrawBitmap(&bmwhiteBtn, 20, 20);  
//		GUI_DrawBitmap(&bmwhiteBtn, ((Rect.x1-Rect.x0)-173)/2, ((Rect.y1-Rect.y0)-207)/2); 
		GUI_DrawBitmap(&bmwhiteLightbackup, ((Rect.x1-Rect.x0)-321)/2, ((Rect.y1-Rect.y0)-232)/2); 
      } 
      break; 
       
    default: 
      BUTTON_Callback(pMsg); 
  } 
} 


extern GUI_CONST_STORAGE GUI_BITMAP bmStbyBtn1024x600;
//  131, // xSize
//  193, // ySize
void _cbStandbyButton1024x600(WM_MESSAGE * pMsg)  
{ 
  WM_HWIN  hWin; 
	GUI_RECT Rect; 

  hWin  = pMsg->hWin; 
  switch (pMsg->MsgId)  
  { 
    case WM_PAINT: 
		WM_GetClientRect(&Rect); 

      if (BUTTON_IsPressed(hWin))  
      { 
		GUI_SetColor(GUI_BLUE); 
        GUI_FillRoundedRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 30); 
        GUI_SetBkColor(GUI_BLUE); 
        GUI_SetColor(GUI_WHITE);  

        GUI_SetAlpha(0xb0); 
		GUI_DrawBitmap(&bmStbyBtn1024x600, ((Rect.x1-Rect.x0)-131)/2, ((Rect.y1-Rect.y0)-193)/2); 
        GUI_SetAlpha(0);     
      }  
      else  
      { 
		 GUI_SetColor(GUI_MAKE_COLOR(0x002E2C2D)); 
        GUI_FillRoundedRect(Rect.x0, Rect.y0, Rect.x1, Rect.y1, 30); 
        GUI_SetBkColor(GUI_MAKE_COLOR(0x002E2C2D)); 
        GUI_SetColor(GUI_WHITE);    

		GUI_DrawBitmap(&bmStbyBtn1024x600, ((Rect.x1-Rect.x0)-131)/2, ((Rect.y1-Rect.y0)-193)/2); 
      } 
      break; 
       
    default: 
      BUTTON_Callback(pMsg); 
  } 
} 